package com.by.config;

import com.alibaba.csp.sentinel.annotation.aspectj.SentinelResourceAspect;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class SentinelConfig {
    //SentinelResourceAspect是一个切面，用于 拦截被@SentinelResource注解标记的方法 ，并根据Sentinel的规则进行流量控制、熔断降级等操作。
    @Bean
    public SentinelResourceAspect sentinelResourceAspect(){
        return new SentinelResourceAspect();
    }
}
